package com.sinevil.tcpTrans.entity.json;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Builder;
import lombok.Data;

/**
 * @Classname FilePacketJson
 * @Description 文件数据包
 * @Version 1.0.0
 * @Date 2024/12/12 19:42
 * @Created by sinevil
 */
@Data
@Builder
public class FilePacketJson extends BasicJson{
    @JsonProperty("uid")
    public String uid;
    @JsonProperty("offset")
    public long offset;
    @JsonProperty("size")
    public int size;
    @JsonProperty("fileData")
    public String fileData;


    public FilePacketJson(){
        this.type = "filePacket";
    }
    public FilePacketJson(String uid,long offset,int size){
        this();
        this.uid = uid;
        this.offset = offset;
        this.size = size;
    }

    public FilePacketJson(String uid,long offset,int size,String data){
        this();
        this.uid = uid;
        this.offset = offset;
        this.size = size;
        this.fileData = data;
    }

}
